﻿<Application 
    x:Class="Tester.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:assets="clr-namespace:DeepForest.Phone.Assets.Controls;assembly=DeepForest.Phone.Assets">

    <!--Application Resources-->
    <Application.Resources>
        <!-- You can override notification box button by overriding the NotificationBoxItem style/template. -->
        <!--<Style TargetType="assets:NotificationBoxItem">
            <Setter Property="Width" Value="180" />
        </Style>-->

        <!-- You can use a different data-template per notification-action by creating a data-template, placing it inside application resource and send the key as action parameter. -->
        <DataTemplate x:Key="OKActionTemplateKey">
            <StackPanel Orientation="Horizontal">
                <Image Source="Resources/ok.png" Width="43" VerticalAlignment="Center" Margin="2" />
                <TextBlock Text="{Binding}" VerticalAlignment="Center" />
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="CancelActionTemplateKey">
            <StackPanel Orientation="Horizontal">
                <Image Source="Resources/cancel.png" Width="43" VerticalAlignment="Center" Margin="2" />
                <TextBlock Text="{Binding}" VerticalAlignment="Center" />
            </StackPanel>
        </DataTemplate>

        <!-- You can also set NotificationBox.ItemTemplate to a different data-template. -->
        <!--<Style TargetType="assets:NotificationBox">
            <Setter Property="ItemTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="{Binding ImageSource}" Width="24" Height="24" VerticalAlignment="Center" Margin="4" />
                            <TextBlock Text="{Binding Content}" VerticalAlignment="Center" Margin="4" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>-->
        
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService 
            Launching="Application_Launching" Closing="Application_Closing" 
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>